(function () {
    document.addEventListener('DOMContentLoaded', function () {
        var html = document.documentElement;
        var windowWidth = html.clientWidth;
        html.style.fontSize = windowWidth / 7.5 + 'px';
    }, false);
})();

$(document).ready(function() {
    var windowWidth =  document.body.clientWidth;
    var topbar = windowWidth / 7.5*.88;
    var windheight = $(window).height(); 
    $(".warper").css({"height":windheight-topbar});



    $(".index-sider .titlebg2").on("click",function(){
		var ulheight =  $(this).parents(".index-sider").find("li").length;
        if($(this).find("span").hasClass("arrow-rota2") | $(this).find("span").hasClass("") ){
           $(this).find("span").removeClass("arrow-rota2").addClass("arrow-rota1");
           $(this).parents(".index-sider").find("ul").stop().animate({height:0}); 
        }else {
			 $(this).find("span").removeClass("arrow-rota1").addClass("arrow-rota2");
             $(this).parents(".index-sider").find("ul").stop().animate({height:ulheight+"rem"}); 
			}
    })
	
	
	
	$(".top-bar .btn").toggle(function(){
			 $(".index-page").stop().animate({left:"6rem"})
		 },function(){
			 $(".index-page").stop().animate({left:"0"})
		 })

    
});
